import os
import sys

def generate_allure_report():

    cmd = 'allure generate ./temp -o ./api用例/new_report --clean'
    result = os.system(cmd)
    if result == 0:
        print("Report successfully generated to ./api用例/new_report")
    else:
        print("Failed to generate Allure report")
        sys.exit(1)

if __name__ == "__main__":
    generate_allure_report()